libxl: don't try to fclose file twice on error in libxl_userdata_store
authorMatthew Daley <mattd@bugfuzz.com>
Tue, 3 Dec 2013 00:00:37 +0000 (13:00 +1300)
committerIan Jackson <Ian.Jackson@eu.citrix.com>
Tue, 3 Dec 2013 17:27:39 +0000 (17:27 +0000)
commit4b07b3cbf29f66da6090d52e75b5fdae592c6441
treee7a31bce48cde21c0f4b4f0728babe80aff304d1
parent39eaabdf4131b5e64c2d4e370fdecd0cb4f046f1
libxl: don't try to fclose file twice on error in libxl_userdata_store

Do this by changing the function to not use stdio file operations, but
just use the fd directly with libxl_write_exactly.

While at it, tidy up the function's style issues.

Coverity-ID: 1056195
Signed-off-by: Matthew Daley <mattd@bugfuzz.com>
tools/libxl/libxl_dom.c